home *** CD-ROM | disk | FTP | other *** search
/ Chip 2003 - Homepage / CHIP.BIN / share / webmaste / csehtmlp / csehtmlp.exe / {app} / ParserRules / xml.xs < prev   
Encoding:
Text File  |  2002-04-22  |  1.6 KB  |  64 lines

  1. //Language: XML
  2. //Copyright (c) 1992-2002 Altium Limited             
  3. //All rights reserved.                               
  4. //http://www.dream-com.com                           
  5. //contact@dream-com.com                              
  6.  
  7. // states
  8. State=snormal
  9. State=sstring1
  10. State=scomment1
  11. State=stag
  12. State=sspecialtag
  13. // tokens
  14. Token=tnone
  15. Token=tstring
  16. Token=tcomment
  17. Token=tident
  18. Token=tinteger
  19. Token=tfloat
  20. Token=tresword
  21. Token=tassembler
  22. Token=turl
  23. Token=twhitespace
  24. //delims
  25. Delimiters=;.,:'"{}[]()?!@#$%^&*-+=|\/
  26.  
  27. //Common
  28. snormal <     stag  tresword
  29. stag [^\>^\"] stag  tresword
  30. stag >        snormal   tresword
  31.  
  32. //snormal  <[/a-z_A-Z][a-z_A-Z0-9]*  stag      tresword
  33. //stag     [a-z_A-Z][a-z_A-Z0-9]*    stag      tident
  34. //stag     >                         snormal   tresword
  35.  
  36.  
  37. //white space
  38. stag #32*                         stag   twhitespace
  39.  
  40. //strings
  41. stag       \"                     sstring1   tstring
  42. sstring1   [^\"]*                 sstring1   tstring
  43. sstring1   \"                     stag       tstring
  44. sstring1   \"\"                   sstring1   tstring
  45. sstring1   $                      stag       tstring
  46.  
  47.  
  48. //comments
  49. snormal       <\!--                    scomment1 tcomment
  50. scomment1  [^\-]*                   scomment1 tcomment
  51. scomment1  -->                      snormal      tcomment
  52.  
  53. //idents
  54. sspecialtag  [#1-#255]  sspecialtag  tresword
  55.  
  56.  
  57. snormal        <\!\[CDATA\[          sspecialtag  tresword
  58. sspecialtag    \]\]>                 snormal      tresword
  59.  
  60. snormal        <\?          sspecialtag  tresword
  61. sspecialtag    \?>          snormal      tresword
  62.  
  63.  
  64.